package engine.collider;

import java.util.ArrayList;

import engine.collider.bounds.BoundingElement;

public class BoundingVolume{
	private ArrayList<BoundingElement> boundingElements;
	
	public BoundingVolume() {
		boundingElements = new ArrayList<BoundingElement>();
	}
	
	public void addBoundingElement(BoundingElement boundingElement) {
		boundingElements.add(boundingElement);
	}
	
	public boolean removeBoundingElement(BoundingElement boundingElement) {
		return boundingElements.remove(boundingElement);
	}
	
	public ArrayList<BoundingElement> getBoundingElements() {
		return boundingElements;
	}
	
	public void addToPosition(double x, double y, double z) {
		for(BoundingElement b: boundingElements) {
			b.setPosition(b.getPosition()[0] + x, b.getPosition()[1] + y, b.getPosition()[2] + z);
		}
	}
}
